At present, with the popularity of networks, users have increasing high requirements on reliability of networks, thus for important network connections, it is a commonly used method to provide backup links.
In a two-layer network, provision of backups for important network connections results in a loop in physical connections of the network, thereby leading to a broadcast storm, and a Spanning Tree Protocol (STP) is used to eliminate the loop in the two-layer network.
The topology of a whole network is shaped in a tree-shaped structure through blocking of redundant links by the STP so that there is only one link between any two points during communication, avoiding generation of a broadcast storm; and when a failure occurs on a link, blocked redundant links can be automatically recovered and used for forwarding, thus achieving the purpose of link backup.
In the prior art, when a failure occurs on a master port indirectly connected with a backup port (there are other devices connected therebetween, messages of a Bridge Protocol Data Unit (BPDU) are transmitted through these devices), no relevant fast recovery mechanism has been established in corresponding standards, what can be done is only to wait until message information of the backup reaches its maximum age (Maxage).
For example, as shown in FIG. 1 that shows a typical application scenario when a backup port is taken as a link backup, a Customer Edge (CE) device is connected with different Provider Edge (PE) devices, and a Rapid Spanning Tree Protocol (RSTP) or a Multiple Spanning Tree Protocol (MSTP) runs on the CE device, PE 1 and PE 2 receive STP BPDU messages, the BPDU messages are transmitted between provider networks through Pseudo Wires (PWs), thus achieving an effect as if port 1 and port 2 of the CE device are directly connected; when the network is normal, port 2 serves as a backup port and is in a blocked state.
When the master port of the CE device, i.e., port 1 fails, port 2 serving as a backup port cannot detect the failure and can only wait until BPDU message information reaches its maxage, then only after twice time of forward delays, port 2 can forward, thus time taken for port recovery is about 50 s, and it is not acceptable for network users to suffer disconnection of that long.